########################################################################
# Code listing from "Advanced Linux Programming," by CodeSourcery LLC  #
# Copyright (C) 2001 by New Riders Publishing                          #
# See COPYRIGHT for license information.                               #
########################################################################

# Default compiler options for C and C++.  To build with other options,
# provide a definition of CFLAGS when invoking make.  For example,
# invoke "make CFLAGS=-O2 all".
CFLAGS          = -g -Wall 
LDFLAGS			= -lpthread		
CXXFLAGS        = $(CFLAGS)

# Pass these variables to make subprocesses.
export          CFLAGS CXXFLAGS

OBJECTS		= sem_all_deall.o udpbroadcast.o serverclient.o
LIBRARIES	= 
PROGRAMS	= server gatectrl gate

.PHONY:         all clean

# Default target: build everything.
all:            $(OBJECTS) $(LIBRARIES) $(PROGRAMS)


# ctags
#ctags:
#	ctags *

# Clean up build products.
clean:
	rm -f *.o *.a tags $(PROGRAMS) 

# Additional dependencies.
server: sem_all_deall.o 
gatectrl: udpbroadcast.o serverclient.o
